home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / audiofile / AFgetinstparamlong.z / AFgetinstparamlong
Encoding:
Text File  |  2002-10-03  |  13.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((3333ddddmmmm))))                                aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afGetInstParams, afSetInstParams, afGetInstParamLong, afSetInstParamLong
  10.      - get / set a parameter list / long parameter value for an instrument
  11.      configuration in an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  15.  
  16.      vvvvooooiiiidddd aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmssss((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  17.                                       AAAAUUUUppppvvvvlllliiiisssstttt ppppvvvvlllliiiisssstttt,,,, iiiinnnntttt nnnnppppaaaarrrraaaammmmssss))))
  18.  
  19.      vvvvooooiiiidddd aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmssss((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  20.                                       AAAAUUUUppppvvvvlllliiiisssstttt ppppvvvvlllliiiisssstttt,,,, iiiinnnntttt nnnnppppaaaarrrraaaammmmssss))))
  21.  
  22.      lllloooonnnngggg aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  23.                                               iiiinnnntttt ppppaaaarrrraaaammmm))))
  24.  
  25.      vvvvooooiiiidddd aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt iiiinnnnssssttttiiiidddd,,,,
  26.                                               iiiinnnntttt ppppaaaarrrraaaammmm,,,, lllloooonnnngggg vvvvaaaalllluuuueeee))))
  27.  
  28. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  29.      _f_i_l_e      is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, previously created by a call to
  30.                aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm).
  31.  
  32.      _i_n_s_t_i_d    is a positive integer which identifies an instrument
  33.                configuration in the file.  Since the number of supported inst
  34.                chunks varies with file format, applications should always
  35.                retrieve this value via aaaaffffGGGGeeeettttIIIInnnnssssttttIIIIDDDDssss(3dm).
  36.  
  37.      _p_v_l_i_s_t    is an AAAAUUUUppppvvvvlllliiiisssstttt structure, previously created by a call to
  38.                AAAAUUUUppppvvvvnnnneeeewwww(3dm)
  39.  
  40.      _n_p_a_r_a_m_s   is an integer value specifying the number of {parameter, value}
  41.                item pairs (containing the instrument parameters) to be set or
  42.                retrieved
  43.  
  44.      _p_a_r_a_m     is a symbolic constant which identifies an instrument
  45.                parameter.
  46.  
  47.      _v_a_l_u_e     is an integer value to be assigned by aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(((()))) to
  48.                the given parameter.
  49.  
  50. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  51.      aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(((()))) returns the value associated with _p_a_r_a_m in the given
  52.      instrument map.  If _i_n_s_t or _p_a_r_a_m is invalid, the return value is 0.
  53.      Note that this routine and aaaaffffQQQQuuuueeeerrrryyyyLLLLoooonnnngggg(3dm) are the only AF routines
  54.      which still return a long int as opposed to an int.
  55.  
  56. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  57.      aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmssss(((()))) returns the values for _n_p_a_r_a_m_s of the parameters in an
  58.      instrument configuration via the AAAAUUUUppppvvvvlllliiiisssstttt structure.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((3333ddddmmmm))))                                aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmssss(((()))) allows you to set _n_p_a_r_a_m_s instrument parameters, via
  75.      the AAAAUUUUppppvvvvlllliiiisssstttt structure, for a file which is opened with write access.
  76.  
  77.      aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(((()))) returns the value for a parameter of type
  78.      AAAAUUUU____PPPPVVVVTTTTYYYYPPPPEEEE____LLLLOOOONNNNGGGG from an instrument configuration.
  79.  
  80.      aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(((()))) allows you to set an instrument parameter of type
  81.      AAAAUUUU____PPPPVVVVTTTTYYYYPPPPEEEE____LLLLOOOONNNNGGGG for a file which is opened with write access.
  82.  
  83.      The valid instrument parameters are:
  84.  
  85.      AAAAFFFF____IIIINNNNSSSSTTTT____MMMMIIIIDDDDIIII____BBBBAAAASSSSEEEENNNNOOOOTTTTEEEE     MIDI base note for sample: 0 to 127
  86.  
  87.      AAAAFFFF____IIIINNNNSSSSTTTT____NNNNUUUUMMMMCCCCEEEENNNNTTTTSSSS____DDDDEEEETTTTUUUUNNNNEEEE   MIDI detune in cents: -50 to 50 for AIFC;
  88.                                limits vary with file format
  89.  
  90.      AAAAFFFF____IIIINNNNSSSSTTTT____MMMMIIIIDDDDIIII____LLLLOOOONNNNOOOOTTTTEEEE       Lowest MIDI note for sample: 0 to 127
  91.  
  92.      AAAAFFFF____IIIINNNNSSSSTTTT____MMMMIIIIDDDDIIII____HHHHIIIINNNNOOOOTTTTEEEE       Highest MIDI note for sample: 0 to 127
  93.  
  94.      AAAAFFFF____IIIINNNNSSSSTTTT____MMMMIIIIDDDDIIII____LLLLOOOOVVVVEEEELLLLOOOOCCCCIIIITTTTYYYY   Lowest MIDI velocity for sample: 1 to 127
  95.  
  96.      AAAAFFFF____IIIINNNNSSSSTTTT____MMMMIIIIDDDDIIII____HHHHIIIIVVVVEEEELLLLOOOOCCCCIIIITTTTYYYY   Highest MIDI velocity for sample: 1 to 127
  97.  
  98.      AAAAFFFF____IIIINNNNSSSSTTTT____NNNNUUUUMMMMDDDDBBBBSSSS____GGGGAAAAIIIINNNN       Gain in dB's for sample
  99.  
  100.      AAAAFFFF____IIIINNNNSSSSTTTT____SSSSUUUUSSSSLLLLOOOOOOOOPPPPIIIIDDDD         Loop id for sustain loop (AIFF and AIFF-C only)
  101.  
  102.      AAAAFFFF____IIIINNNNSSSSTTTT____RRRREEEELLLLLLLLOOOOOOOOPPPPIIIIDDDD         Loop id for release loop (AIFF and AIFF-C only)
  103.  
  104.      Additional instrument parameters (for non-AIFF files):
  105.  
  106.      AAAAFFFF____IIIINNNNSSSSTTTT____SSSSAAAAMMMMPPPP____SSSSTTTTAAAARRRRTTTTFFFFRRRRAAAAMMMMEEEE   Starting frame of sample associated with the
  107.                                inst: 0 or greater
  108.  
  109.      AAAAFFFF____IIIINNNNSSSSTTTT____SSSSAAAAMMMMPPPP____EEEENNNNDDDDFFFFRRRRAAAAMMMMEEEE     Ending frame of sample associated with the
  110.                                inst: 0 or greater
  111.  
  112.      AAAAFFFF____IIIINNNNSSSSTTTT____SSSSAAAAMMMMPPPP____MMMMOOOODDDDEEEE         Sample looping mode associated with the inst.
  113.                                If this parameter is present, it will be one of
  114.                                the following:
  115.  
  116.           AF_INST_LOOP_OFF
  117.           AF_INST_LOOP_CONTINUOUS
  118.           AF_INST_LOOP_SUSTAIN
  119.  
  120.      AAAAFFFF____IIIINNNNSSSSTTTT____TTTTRRRRAAAACCCCKKKKIIIIDDDD
  121.           Track ID for inst sample data:  AF_DEFAULT_TRACK
  122.  
  123.      AAAAFFFF____IIIINNNNSSSSTTTT____NNNNAAAAMMMMEEEE
  124.           Name string for instrument configuration.  This is type
  125.           AAAAUUUU____PPPPVVVVTTTTYYYYPPPPEEEE____PPPPTTTTRRRR.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((3333ddddmmmm))))                                aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140.      AAAAFFFF____IIIINNNNSSSSTTTT____SSSSAAAAMMMMPPPP____RRRRAAAATTTTEEEE
  141.           Sample rate for sample associated with the inst.  This is type
  142.           AAAAUUUU____PPPPVVVVTTTTYYYYPPPPEEEE____DDDDOOOOUUUUBBBBLLLLEEEE
  143.  
  144.      Note that the last two are NOT AAAAUUUU____PPPPVVVVTTTTYYYYPPPPEEEE____LLLLOOOONNNNGGGG and therefor cannot be set
  145.      or retrieved via aaaaffff{{{{SSSSeeeetttt,,,,GGGGeeeetttt}}}}IIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(((()))) -- you must use
  146.      aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmssss(((()))) and retrieve the value using AAAAUUUUppppvvvvggggeeeettttvvvvaaaallll(3dm).
  147.  
  148. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  149.      You can obtain loop ID's for the sustain and release loops in an AIFF-C
  150.      file by calling aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(((()))).
  151.  
  152.      For each of these loop ID's, you can obtain start and end sample frame
  153.      marker ID's by calling aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm) and aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(3dm).
  154.  
  155.      Finally, you can obtain the sample frame marker positions by calling
  156.      aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(3dm).  These positions tell you the beginning and end
  157.      sample frame locations for each of the loops.
  158.  
  159. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  160.      This function may return an arbitrary number of instrument parameters,
  161.      unlike the fixed set found in AIFF/AIFF-C files.  Many file formats have
  162.      different inst configurations than AIFF/AIFF-C.  As mentioned above,
  163.      parameters exist whose type is not AAAAUUUU____PPPPVVVVTTTTYYYYPPPPEEEE____LLLLOOOONNNNGGGG, and these must be
  164.      retrieved via aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmssss(3dm).
  165.  
  166.      In the case of INST parameters it is important to to query at runtime the
  167.      capabilities of a given file format prior to retrieving the params.  An
  168.      application can use aaaaffffQQQQuuuueeeerrrryyyy(3dm) to determine whether a given file format
  169.      supports INST chunks, and if so, the quantity, ID, and return type of any
  170.      instrument parameters.  Apps should also be written to expect and ignore
  171.      instrument configurations or instrument parameters they do not
  172.      understand.
  173.  
  174. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  175.      afOpenFile(3dm), afGetLoopStart(3dm), afSetLoopStart(3dm),
  176.      afGetMarkPosition(3dm), afQuery(3dm)
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.